<?php
require_once(dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR ."core".DIRECTORY_SEPARATOR."functions.php");
core::getResource("Controller.baseController");
core::getResource("Model.Login");

class LoginController extends baseController
{
	private $email,$password;
	private $loginAuth;//model class
	
	public function __construct($email,$password)
	{
		$this->loginAuth = new Login($email,$password);
	}
	
	public function tryLogin()
	{
		if($this->loginAuth->tryLogin()==LOGIN_SUCCESS)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	
	public function getId()
	{
		return $this->loginAuth->getId();
	}

	public function getAccountType()
	{
		return $this->loginAuth->getAccountType();
	}
}